package cn.jingdalei.system.service.impl;

import cn.jingdalei.basic.service.impl.BaseServiceImpl;
import cn.jingdalei.system.domain.SystemDictionaryType;
import cn.jingdalei.system.mapper.SystemDictionaryTypeMapper;
import cn.jingdalei.system.service.ISystemDictionaryTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(readOnly = true,propagation = Propagation.SUPPORTS) // 事务管理
public class SystemDictionaryTypeServiceImpl extends BaseServiceImpl<SystemDictionaryType> implements ISystemDictionaryTypeService {

    @Autowired
    private SystemDictionaryTypeMapper systemDictionaryTypeMapper;

    @Override
    public void delete(Long id) {
        systemDictionaryTypeMapper.delByTypeId(id);
        super.delete(id);
    }

    @Override
    public void patchDel(List<Long> ids) {
        systemDictionaryTypeMapper.patchDelDetail(ids);
        super.patchDel(ids);
    }
}
